package com.imooc.framework.stream;

import java.util.Optional;
import java.util.stream.Stream;

public class AllMatchDemo {

    public static void main(String[] args) {
        Stream<Employee> stream = Employee.getEmpList().parallelStream();
        Optional<Employee> employee = stream.findAny();
//        boolean flag = stream.noneMatch(employee -> employee.getAge() > 25);
//        System.out.println(flag);
        System.out.println(employee.get());
    }
}
